package com.wgts.wgts.mvp.presenter.imp;

import com.wgts.wgts.mvp.model.IMyExtensionActivityModel;
import com.wgts.wgts.mvp.presenter.IMyExtensionActivityPresenter;
import com.wgts.wgts.mvp.view.IMyExtensionActivityView;
import com.wgts.wgts.netmodle.HttpResultSubscriber;
import com.wgts.wgts.netmodle.resp.AppModleEntity;

import java.util.List;

public class MyExtensionActivityPresenter implements IMyExtensionActivityPresenter {

    private IMyExtensionActivityView view;

    private IMyExtensionActivityModel model;

    public MyExtensionActivityPresenter(IMyExtensionActivityView view, IMyExtensionActivityModel model) {
        this.view = view;
        this.model = model;
    }

    @Override
    public void loadGif() {
        model.loadGif(new HttpResultSubscriber<List<AppModleEntity>>() {
            @Override
            public void onSuccess(List<AppModleEntity> appModleEntities) {
                view.gifLoad(appModleEntities);
            }

            @Override
            public void _onError(int status, String msg) {

            }
        });
    }
}
